/* eslint-disable max-classes-per-file */
import { JsonProperty, Serializable } from '@/plugins/reflect-metadata';

@Serializable()
export class FaQuestionItem {
  @JsonProperty('searchValue')
    searchValue: string = '';

  @JsonProperty('createBy')
    createBy: string = '';

  @JsonProperty('createTime')
    createTime: string = '';

  @JsonProperty('updateBy')
    updateBy: string = '';

  @JsonProperty('updateTime')
    updateTime: string = '';

  @JsonProperty('remark')
    remark: string = '';

  @JsonProperty('params')
    params: any = {};

  @JsonProperty('noticeId')
    noticeId: number = 0;

  @JsonProperty('noticeTitle')
    noticeTitle: string = '';

  @JsonProperty('noticeType')
    noticeType: string = '';

  @JsonProperty('noticeContent')
    noticeContent: string = '';

  @JsonProperty('status')
    status: string = '';
}

@Serializable()
export class FaQuestionQuery {
  @JsonProperty('noticeType')
    noticeType: string = '4';

  get query() {
    return {
      noticeType: this.noticeType,
    };
  }
}

@Serializable()
export default class FaQuestionList {
  @JsonProperty({ name: 'data', type: FaQuestionItem })
    items: FaQuestionItem[] = [];

  get total(): number {
    return this.items.length;
  }
}
